﻿#pragma once
#include <stdint.h>

constexpr uint8_t NOP_OPCODE = 0x90;
constexpr uint8_t RET_OPCODE = 0xC3;
constexpr uint8_t JMP_OPCODE = 0xE9;
constexpr uint8_t JNE_OPCODE = 0x85;

#define GAME_VERSION 400

// Added constants for DivaSound to decide at compile time which version you're going to compile for.
// Shouldn't take long to get this up for most game versions.
// Added 04/19/2020 가자onetwo

#if GAME_VERSION == 400
constexpr uint64_t DIVA_INIT_AUDIO = 0x1404983f0;
constexpr uint64_t DIVA_AUDIO_FILL_BUFFER = 0x140498d80;
constexpr uint64_t DIVA_AUDIO_ALLOC_MIXER = 0x140498110;
constexpr uint64_t MUTEX_INIT = 0x140775b2c;
constexpr uint64_t MUTEX_LOCK = 0x140775b88;
constexpr uint64_t MUTEX_UNLOCK = 0x140775c0c;
#endif

#if GAME_VERSION == 700
constexpr uint64_t DIVA_INIT_AUDIO = 0x1406269F0;
constexpr uint64_t DIVA_AUDIO_FILL_BUFFER = 0x140627370;
constexpr uint64_t DIVA_AUDIO_ALLOC_MIXER = 0x140626710;
constexpr uint64_t MUTEX_INIT = 0x14081DEF4;
constexpr uint64_t MUTEX_LOCK = 0x14081DF50;
constexpr uint64_t MUTEX_UNLOCK = 0x14081DFD4;
#endif